//
//  GYMineBuyInfoEditViewModel.h
//  GYDemo
//
//  Created by mac on 2018/3/28.
//  Copyright © 2018年 mac. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "GCBaseViewModel.h"
#import "GYMineBuyInfoDetailViewModel.h"

@interface GYMineBuyInfoEditDetailCellModel : NSObject
@property (nonatomic,strong) NSString *title;
@property (nonatomic,strong) NSString *viewKey;
@property (nonatomic,strong) NSString *key;
@property (nonatomic,strong) NSString *value;
@property (nonatomic,assign) BOOL isEditable;
@property (nonatomic,assign) UIKeyboardType inputType;
@property (nonatomic,strong) NSString *action;
@property (nonatomic,assign) CGFloat cellHeight;
@property (nonatomic,assign) BOOL isExpandable;
@property (nonatomic,strong) NSDictionary *other;
-(GYMineBuyInfoEditDetailCellModel *)initWithTitle:(NSString *)title key:(NSString *)key action:(NSString *)action;
-(GYMineBuyInfoEditDetailCellModel *)initWithTitle:(NSString *)title key:(NSString *)key action:(NSString *)action other:(NSDictionary *)other;
-(GYMineBuyInfoEditDetailCellModel *)initWithTitle:(NSString *)title key:(NSString *)key keyboardType:(UIKeyboardType)inputType;
@end

///提交新求购model
@interface GYMineBuyInfoEditUpdateModel : NSObject
{
    NSArray *mustFillKeys;
}
///必填
@property (nonatomic,strong) NSString *name;
@property (nonatomic,strong) NSString *protypeid;
@property (nonatomic,strong) NSString *province;
@property (nonatomic,strong) NSString *city;
@property (nonatomic,strong) NSString *area;
@property (nonatomic,strong) NSString *unit;
@property (nonatomic,strong) NSString *maxprice;
@property (nonatomic,strong) NSString *minprice;
@property (nonatomic,strong) NSString *count;
@property (nonatomic,strong) NSString *setnum;
@property (nonatomic,strong) NSString *endTimteStr;
///选填
@property (nonatomic,strong) NSString *idField;
@property (nonatomic,strong) NSString *descriptionField;
@property (nonatomic,strong) NSMutableDictionary *otherInfo;
-(NSMutableDictionary *)exportParameter;
@end

@interface GYMineBuyInfoEditViewModel : GCBaseViewModel
@property (nonatomic,strong) GYMineBuyInfoDetailModel *buyInfoDetailModel;
@property (nonatomic,strong) GYMineBuyInfoEditUpdateModel *updateModel;
@property (nonatomic,strong) NSMutableArray *detailItems;
@property (nonatomic,strong) NSString *name;
@property (nonatomic,strong) NSString *catogery;
@property (nonatomic,strong) NSString *count;
@property (nonatomic,strong) NSString *area;
@property (nonatomic,strong) NSString *price;
@property (nonatomic,strong) NSString *valid;
@property (nonatomic,strong) NSString *desc;
@property (nonatomic,strong) NSString *unit;
@property (nonatomic,strong) NSString *updateSign;
///请求商品类型特殊属性
-(void)requestType:(NSMutableDictionary *)para;
///保存或提交求购信息
-(void)requestSave;
@end
